-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(AI Agent Node): Fix tools agent when using memory and Anthropic models #10513
fix(AI Agent Node): Fix tools agent when using memory and Anthropic models #10513
Conversation
packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/execute.ts
Show resolved
Hide resolved
packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/execute.ts
Outdated
Show resolved
Hide resolved
@burivuhster I've added a more detailed comment explaining what the |
packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/execute.ts
Outdated
Show resolved
Hide resolved
packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/execute.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos for a detailed comment! Please check the duplication, otherwise good to go.
9096969
to
cf0c33f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
n8n Run #6732
Run Properties:
|
Project |
n8n
|
Branch Review |
ai-259-issue-with-anthropic-model-tools-agent-memory
|
Run status |
Passed #6732
|
Run duration | 04m 45s |
Commit |
cf0c33f359: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 OlegIvaniv 🗃️ e2e/*
|
Committer | Oleg Ivaniv |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
1
|
Pending |
0
|
Skipped |
0
|
Passing |
422
|
View all changes introduced in this branch ↗︎ |
✅ All Cypress E2E specs passed |
* master: refactor(RabbitMQ Trigger Node): Improve type-safety, add tests, and fix issues with manual triggers (#10663) feat(editor): Add support for nodes with multiple main inputs in new canvas (no-changelog) (#10659) fix(editor): Set minimum zoom to 0 to allow fitting very large workflows in new canvas (no-changelog) (#10666) feat(editor): Change selection to be default canvas behaviour (no-changelog) (#10668) feat: More hints to nodes (#10565) fix(editor): Fix opening executions tab from a new, unsaved workflow (#10652) fix(AI Agent Node): Fix tools agent when using memory and Anthropic models (#10513) feat(editor): Make highlighted data pane floating (#10638) fix(editor): Fix workflow loading after switching to executions view in new canvas (no-changelog) (#10655) refactor(benchmark): Separate cloud env provisioning from running benchmarks (#10657) feat(core): Implement wrapping of regular nodes as AI Tools (#10641) refactor(editor): Remove Trial logic in personalization modal and port to script setup (#10649) fix(core): Declutter webhook insertion errors (#10650) feat: Reintroduce collaboration feature (#10602) feat(benchmark): Add scenario for expressions with Set node (#10647) feat(benchmark): Add benchmark scenario for binary files (#10648) build: Add `reset` script (#10627) feat(editor): Overhaul node insert position computation in new canvas (no-changelog) (#10637)
Got released with |
Summary
When using Anthropic models paired with memory, we discovered an issue with a Tools agent which would throw an error when populating the memory. To fix it, we need to check
AgentFinish
step if it contains string or array output(in Anthropic's case) and merge the text-only array of outputs to a single item.Related Linear tickets, Github issues, and Community forum posts
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)